<template>
	<view class="nav-cell-container" @click="onClick">
		<!-- 图标 -->
		<view class="icon">
			<slot name="icon"></slot>
		</view>
		<!-- 文字 -->
		<view class="text">
			{{text}}
		</view>
		<!-- 图标 -->
		<uni-icons type="arrowright"></uni-icons>
	</view>
</template>

<script>
	// 需要传递进来的
	//	1. 文字
	//  2. 图标
	// 	3. 跳转地址
	export default {
		props: {
			text: {
				type: String
			},
			url: String
		},
		data() {
			return {

			};
		},
		methods:{
			onClick(){
				uni.navigateTo({
					url:this.url
				})
			}
		}
	}
</script>

<style lang="less">
	.nav-cell-container {
		display: flex;
		padding: 15rpx;
		height: 80rpx;
		justify-content: space-between;
		align-items: center;
		border-top: 1rpx solid #d4d4d4;
		border-bottom: 1rpx solid #d4d4d4;
		
		.icon {
			width: 50rpx;
			height: 50rpx;
		}

		.text {
			flex-grow: 1;
		}

		image {
			width: 100%;
			height: 100%;
		}

		/deep/ uni-image {
			width: 100%;
			height: 100%;
		}
	}
</style>
